ASTC interpolation

ABSTRACT

A binary logic circuit for performing an interpolation calculation between two endpoint values E 0  and E 1  using a weighting index i for generating an interpolated result P, the values E 0  and E 1  being formed from Adaptive Scalable Texture Compression (ASTC) low-dynamic range (LDR) colour endpoint values C 0  and C 1  respectively, the circuit comprising: an interpolation unit configured to perform an interpolation between the colour endpoint values C 0  and C 1  using the weighting index i to generate a first intermediate interpolated result C 2 ; and combinational logic circuitry configured to receive the interpolated result C 2  and to perform one or more logical processing operations to calculate the interpolated result P according to the equation P=└((C 2 &lt;&lt;8)+C 2 +32)/64┘ when the interpolated result is not to be compatible with an sRGB colour space, and according to the equation P=└((C 2 &lt;&lt;8)+128·64+32)/64┘ when the interpolated result is to be compatible with an sRGB colour space.

CROSS REFERENCE TO RELATED APPLICATIONS AND CLAIM OF PRIORITY

This application is a continuation under 35 U.S.C. 120 of copendingapplication Ser. No. 16/722,584 filed Dec. 20, 2019, which claimsforeign priority under 35 U.S.C. 119 from United Kingdom Application No.1820836.3 filed Dec. 20, 2018.

FIELD

This invention relates to performing interpolation of endpoint valuesspecified according to the Adaptive Scalable Texture Compression (ASTC)format.

BACKGROUND

Textures are used heavily within the field of graphics processing.Textures may be used to represent surface properties, illumination (e.g.within the environment of a scene being imaged) or to apply surfacedetail to an object being rendered. Textures may require relativelylarge amounts of memory storage, and texture accesses can contribute asignificant proportion of a graphics device's memory bandwidth. As such,it is often desirable to compress texture data.

One texture compression format is known as Adaptive Scalable TextureCompression (ASTC).

In ASTC, a compressed image, or texture, is subdivided into a pluralityof data blocks, where each data block represents the texture data for ablock of texels forming the texture. Each block of data has a fixedmemory footprint (i.e. has a fixed size) of 128 bits. However, the datablocks are capable of representing the texture data for a varying numberof texels. The number of texels represented by a single data block maybe referred to as the block footprint. The block footprint may be fixedfor a given texture. The block footprint's height and width (in texels)are generally selectable from a number of predefined sizes. Thefootprint may be rectangular, and in some cases the block's footprintmay be square. For 2-D textures, examples of block footprints include4×4 texels; 6×6 texels; 8×8 texels and 12×12 texels (giving compressionrates of 8 bits per pixel (bpp); 3.56 bpp; 2 bpp and 0.89 bpprespectively).

The colour of each texel within a block is defined as a point on alinear gradient between a pair of colours. This pair of colours isreferred to as a pair of “colour endpoints”. Each colour endpointdefines a colour. Each colour endpoint includes one or more components.A colour endpoint may include one, two, three or four components(typically corresponding to R, RG, RGB and RGBA textures respectively).

When decoding a texel, colour values are decoded from the data block andthose values are then converted into colour endpoints. The way colourvalues are converted into colour endpoints is defined by a parameterknown as the colour endpoint mode. Information on the colour endpointmode for a texel is encoded within the data block. The ASTCspecification defines 16 possible colour endpoint modes, which vary fromcomputing a colour endpoint from a single colour value up to computing acolour endpoint from four colour values.

In conventional implementations, colours for each texel are calculatedby interpolating between a pair of endpoints that are generated from acolour endpoint pair. The endpoints used for interpolation are formed of16-bit endpoint components, and are generated from respective colourendpoints formed of 8-bit components (for textures encoded using lowdynamic range (LDR)) or 12-bit components (for textures encoded usinghigh dynamic range (HDR)). If the endpoints are formed of multiplecomponents, then interpolation between a pair of endpoints involvesinterpolating between each respective component of the pair ofendpoints. An interpolant weight can be used to specify a weightedaverage of the two endpoints, which corresponds to specifying a positionon a linear gradient between the colour endpoints, to thereby define thecolour for that texel.

A schematic illustration of the interpolation is shown in FIG. 1A, whichshows a pair of colour endpoints A (denoted 104) and B (denoted 106) ina red-blue (RB) colour space denoted 102. In this example, each texelcan have one of five weights: 0/4 (corresponding to colour A); ¼; 2/4;¾; or 4/4 (corresponding to colour B). An example of the texel weightsfor each texel of a 4 by 4 block is shown in FIG. 1B.

Though shown for the simple example of an RB colour space, the sameapproach is applied when working in different colour spaces such as RGBor RGBA.

The interpolant weights may be stored in the form of a weight grid,which is a 2-D grid of weight values corresponding to the block oftexels represented in the data block. In certain encodings, aninterpolant weight may be stored for each texel in the data block (i.e.the dimensions of the weight grid correspond to the dimensions of theblock footprint). However, for data blocks that represent texture datafor a larger number of texels (e.g. 12×12 texels), there may not beenough data within the block to store an interpolant weight for eachtexel. In this case, a sparser weight grid may be stored that containsfewer weights than the number of texels within each data block. A weightfor each texel in the data block can then be calculated from aninterpolation of this sparser weight grid.

In order to do this, the coordinates of a texel within the block arefirst scaled to the dimensions of the weight grid. The coordinates arescaled by a scale factor that scales the dimensions of the weight gridto the dimensions of the block footprint. The re-scaled position of thetexel with respect to the weight grid is then used to select a subset ofweights of the weight grid and to interpolate those to calculate aweight for the texel. For example, four weights from the block ofadjacent weight grid points around a texel may be selected andinterpolated to calculate the weight for the texel.

In certain cases, a single pair of colour endpoints can be used tocalculate the colour for each texel within a data block. However, inother cases, a block may represent texels which have a mixture ofdifferent colours that cannot reasonably be represented by interpolatingbetween a single pair of colour endpoints. To get around this problem,each texel in the data block can be assigned to one of up to fourpartitions, where each partition is associated with its own colourendpoint pair. To determine the colour of a texel within the block, thepartition that the texel belongs to is determined and the colourcalculated from the interpolant weight for that texel and the colour endpoint pairs associated with the partition. The interpolant weight can bestored and encoded within the data block independently of the colour endpoint pair (i.e. independently of the partition to which the texelbelongs).

This is illustrated schematically in FIGS. 2A and 2B. FIG. 2A shows afirst colour endpoint pair 202 formed of endpoint colours A and B, and asecond colour endpoint pair 204 formed of endpoint colours C and Dwithin an RB colour space 206. The first endpoint pair belongs to afirst partition and the second endpoint pair belongs to a secondpartition. Thus in this example there are two partitions. Each colourendpoint pair can be interpolated between with five weights. FIG. 2Bshows a block of texels 208 represented by a block of texture data. Apartitioning mask is shown overlaid on the block of texels indicatingwhich partition each texel belongs to. The partitioning mask is a gridof values, where each value indicates which partition a texel belongsto. Each value may as such be referred to as a partition index. Inparticular, a value of 1 indicates a texel belongs to the firstpartition (associated with colour endpoint pair 202); and a value of 2indicates a texel belongs to the second partition (associated withcolour endpoint pair 204). The weights for each texel are also shown. Todetermine the colour for a texel, the partition index is used toidentify the colour endpoint pair, and the weight is used to interpolatebetween that pair. For example, texel 210 has a partition index of 1,and a weight of ¾ and thus has a colour defined by the position 212 inRB colour space. Texel 214 has a partition index of 2 and a weight of ¼and so has a colour defined by the position 216 in RB colour space.

Whilst ASTC can provide an effective way of compressing texture data,the decoding hardware for decoding texture data compressed in accordancewith ASTC can often be costly in terms of hardware resources and siliconarea.

SUMMARY

According to the present invention there is provided a binary logiccircuit for performing an interpolation calculation between two endpointvalues E₀ and E₁ using a weighting index i for generating aninterpolated result P, the values E₀ and E₁ being formed from AdaptiveScalable Texture Compression (ASTC) low-dynamic range (LDR) colourendpoint values C₀ and C₁ respectively, the circuit comprising:

-   -   an interpolation unit configured to perform an interpolation        between the colour endpoint values C₀ and C₁ using the weighting        index i to generate a first intermediate interpolated result C₂;        and    -   combinational logic circuitry configured to receive the        interpolated result C₂ and to perform one or more logical        processing operations to calculate the interpolated result P        according to the equation P=└((C₂<<8)+C₂+32)/64┘ when the        interpolated result is not to be compatible with an sRGB colour        space, and according to the equation P=└((C₂<<8)+128.64+32)/64┘        when the interpolated result is to be compatible with an sRGB        colour space.

The interpolation calculation between the two endpoint values E₀ and E₁using the weighting index i may be specified according to the equationp=└(E₀·(64−i)+E₁·i+32)/64┘, where p is equal to the interpolated result.

The interpolation unit may comprise an interpolator configured toperform the interpolation between the colour endpoint values C₀ and C₁using the weighting index i to generate the interpolated result C₂according to the equation C₂=C₀·(64−i)+C₁·i for non-exception values ofi.

The interpolation unit may further comprise exception-handling circuitryconfigured to generate the interpolated result C₂ for exception valuesof i.

The exception handling circuitry may be configured to generate theinterpolated result C₂ according to the equation C₂=C₁·i for exceptionvalues of i.

The weighting index may comprise 7 bits, and the interpolator may beconfigured to perform the interpolation between the colour endpointvalues C₀ and C₁ using the 6 least significant bits of the weightingindex.

The combinational logic circuitry may comprise:

-   -   formatting circuitry configured to generate a second        intermediate interpolated result from the set of values C₀, C₁        and C₂ in dependence on whether the interpolated result is to be        compatible with an sRGB colour space;    -   a first logic unit configured to left-shift the second        intermediate interpolated result by a number of bits equal to        the number of bits of each of the colour endpoint values C₀ and        C₁ and to add to the shifted result a constant to generate a        third intermediate interpolated result; and    -   a second logic unit configured to add the second intermediate        interpolated result to the third interpolated result if the        interpolated result is not to be compatible with the sRGB colour        space.

The combinational logic circuitry may further comprise a right-shifterconfigured to right-shift the output of the second logic unit by aspecified number of bits to generate the interpolated result.

The specified number of bits may be equal to 6.

The first logic unit may be configured to left-shift the secondintermediate interpolated result by 8 bits and to add a numericalconstant of 32 to generate the third intermediate interpolated result.

The formatting circuity may be configured to generate the secondintermediate interpolated result as: (i) the first intermediateinterpolated result C₂ when the interpolated result is not to becompatible with an sRGB colour space; (ii) the summation of the firstintermediate interpolated result C₂ and a numerical constant when theinterpolated result is to be compatible with an sRGB colour space.

The formatting circuity may be configured to generate the secondintermediate interpolated result as: (i) the interpolated result C₂output from the interpolator when the interpolated result is not to becompatible with an sRGB colour space and the value of the weightingindex is not equal to an exception value; (ii) the summation of theinterpolated result C₂ output from the interpolator and a numericalconstant when the interpolated result is to be compatible with an sRGBcolour space and the value of the weighting value is not equal to anexception value; (iii) the interpolated result C₂ output from theexception-handling circuity when the interpolated result is not to becompatible with an sRGB colour space and the value of the weightingindex is equal to an exception value; and iv) the summation of theinterpolated result C₂ output from the exception-handling circuity and anumerical constant when the interpolated result is to be compatible withan sRGB colour space and the value of the weighting value is equal to anexception value.

The formatting circuitry may comprise:

-   -   a selection unit configured to select between (i) a first input        dependent on the interpolated result C₂ output from the        exception handling circuitry; and (ii) a second input dependent        on the interpolated result C₂ output from the interpolator, in        dependence on whether the value of the weighting index is equal        to an exception value.

The formatting circuitry may comprise a logic unit configured to add anon-zero numerical constant to its received inputs only if theinterpolated result is to be compatible with an sRBG colour space.

The input to the logic unit may be the output of the selection unit.

The inputs to the logic unit may be the interpolated result C₂ outputfrom the exception-handling circuity, and the interpolated result C₂output from the interpolator.

The first input to the selection unit may be the interpolated result C₂output from the exception-handling circuitry and the second input to theselection unit is the interpolated result C₂ output from theinterpolator.

According to a second aspect of the present disclosure there is provideda method of using a binary logic circuit to interpolate between twoendpoint values E₀ and E₁ using a weighting index i for generating aninterpolated result P, the values E₀ and E₁ being formed from AdaptiveScalable Texture Compression (ASTC) low-dynamic range (LDR) colourendpoint values C₀ and C₁ respectively, the method comprising:

-   -   performing at an interpolation unit of the binary logic circuit        an interpolation between the colour endpoint values C₀ and C₁        using the weighting index i to generate a first intermediate        interpolated result C₂;    -   receiving at combinational logic circuitry of the binary logic        circuit the interpolated result C₂, and performing one or more        logical processing operations to calculate the interpolated        result P according to the equation P=└((C₂<<8)+C₂+32)/64┘ when        the interpolated result is not to be compatible with an sRGB        colour space, and according to the equation        P=└((C₂<<8)+128.64+32)/64┘ when the interpolated result is to be        compatible with an sRGB colour space.

The interpolation calculation between the two endpoint values E₀ and E₁using the weighting index i may be specified according to the equationp=└(E₀·(64−i)+E₁·i+32)/64┘, where p is equal to the interpolated result.

The step of performing the interpolation at the interpolation unit maycomprise using the weighting index i to generate using an interpolatorthe interpolated result C₂ according to the equation C₂=C₀·(64−i)+C₁·ifor non-exception values of i.

The step of performing the interpolation at the interpolation unit mayfurther comprise generating at exception-handling circuitry theinterpolated result C₂ for exception values of i.

The interpolated result for exception values of i may be generatedaccording to the equation C₂=C₁·i.

The step of performing one or more logical processing operations maycomprise:

-   -   generating at a formatting unit a second intermediate        interpolated result from the set of values C₀, C₁ and C₂ in        dependence on whether the interpolated result is to be        compatible with an sRGB colour space;    -   left-shifting the second intermediate interpolated result by a        number of bits equal to the number of bits of each of the colour        endpoint values C₀ and C₁ and adding to the shifted result a        constant to generate a third intermediate interpolated result;        and    -   adding the second intermediate interpolated result to the third        interpolated result if the interpolated result is not to be        compatible with the sRGB colour space.

The step of performing one or more logical processing operations mayfurther comprise:

-   -   right-shifting the output of the second logic unit by a        specified number of bits to generate the interpolated result.

The method may comprise left-shifting the second intermediateinterpolated result by 8 bits and adding a numerical constant of 32 togenerate the third intermediate interpolated result.

The second intermediate interpolated result may be generated as: (i) thefirst intermediate interpolated result C₂ when the interpolated resultis not to be compatible with an sRGB colour space; (ii) the summation ofthe first intermediate interpolated result C₂ and a numerical constantwhen the interpolated result is to be compatible with an sRGB colourspace.

The second intermediate interpolated result may be generated as: (i) theinterpolated result C₂ generated by the interpolator when theinterpolated result is not to be compatible with an sRGB colour spaceand the value of the weighting index is not equal to an exception value;(ii) the summation of the first interpolated result C₂ generated by theinterpolator and a numerical constant when the interpolated result is tobe compatible with an sRGB colour space and the value of the weightingvalue is not equal to an exception value; (iii) the interpolated resultC₂ generated by the exception-handling circuity when the interpolatedresult is not to be compatible with an sRGB colour space and the valueof the weighting index is equal to an exception value; and iv) thesummation of the interpolated result C₂ generated by theexception-handling circuity and a numerical constant when theinterpolated result is to be compatible with an sRGB colour space andthe value of the weighting value is equal to an exception value.

The binary logic circuit may be embodied in hardware on an integratedcircuit.

There may be provided an integrated circuit definition dataset that,when processed in an integrated circuit manufacturing system, configuresthe integrated circuit manufacturing system to manufacture a binarylogic circuit according to any of the examples herein.

There may be provided an integrated circuit manufacturing systemconfigured to manufacture a binary logic circuit according to any of theexamples herein.

There may be provided a manufacturing, using an integrated circuitmanufacturing system, a binary logic circuit according to any of theexamples herein.

There may be provided a method of manufacturing, using an integratedcircuit manufacturing system, a binary logic circuit according to any ofthe examples herein, the method comprising:

-   -   processing, using a layout processing system, a computer        readable description of the graphics processing system so as to        generate a circuit layout description of an integrated circuit        embodying the binary logic circuit; and    -   manufacturing, using an integrated circuit generation system,        the binary logic circuit according to the circuit layout        description.

There may be provided computer program code for performing a methodaccording to any of the examples herein.

There may be provided non-transitory computer readable storage mediumhaving stored thereon computer readable instructions that, when executedat a computer system, cause the computer system to perform the methodaccording to any of the examples herein.

There may be provided a non-transitory computer readable storage mediumhaving stored thereon a computer readable description of a binary logiccircuit according to any of the examples herein that, when processed inan integrated circuit manufacturing system, causes the integratedcircuit manufacturing system to manufacture an integrated circuitembodying the binary logic circuit.

There may be provided a computer readable storage medium having storedthereon a computer readable description of a binary logic circuitaccording to any of the examples herein which, when processed in anintegrated circuit manufacturing system, causes the integrated circuitmanufacturing system to:

-   -   process, using a layout processing system, the computer readable        description of the binary logic circuit so as to generate a        circuit layout description of an integrated circuit embodying        the binary logic circuit; and    -   manufacture, using an integrated circuit generation system, the        binary logic circuit according to the circuit layout        description.

There may be provided an integrated circuit manufacturing systemcomprising:

-   -   a non-transitory computer readable storage medium having stored        thereon a computer readable description of a binary logic        circuit according to any of the examples herein;    -   a layout processing system configured to process the computer        readable description so as to generate a circuit layout        description of an integrated circuit embodying the binary logic        circuit; and    -   an integrated circuit generation system configured to        manufacture the binary logic circuit according to the circuit        layout description.

BRIEF DESCRIPTION OF DRAWINGS

The present invention will now be described by way of example withreference to the accompanying drawings. In the drawings:

FIG. 1A shows a colour endpoint pair located within an RB colour space.

FIG. 1B shows a 4 by 4 block of texels and a grid of weights indicatingthe weight for each texel used to interpolate between a colour endpointpair.

FIG. 2A shows two colour endpoint pairs located within an RB colourspace.

FIG. 2B shows a 4 by 4 block of texels with a partition mask indicatingthe partition index of each texel and a weight grid indicating theweight for each texel.

FIG. 3 shows a multi-output decoder for decoding a plurality of texelsfrom a block of data compressed according to the ASTC specification.

FIG. 4 shows the block footprint for a block of texture data and asub-block of texels to be decoded from that block.

FIG. 5 shows an example structure of a parameter decode unit formingpart of the decoder shown in FIG. 3 .

FIG. 6 shows an example structure of a colour decode unit forming partof the decoder shown in FIG. 3 .

FIG. 7 shows an example structure of a weight decode unit forming partof the decoder shown in FIG. 3 .

FIG. 8 shows an illustration of how coordinates of a texel within ablock can be rescaled to the dimensions of a weight grid.

FIG. 9 shows an example of an interpolation unit supporting LDR inputsforming part of the decoder shown in FIG. 3 .

FIG. 10 shows an alternative example of an interpolation unit supportingLDR inputs forming part of the decoder shown in FIG. 3 .

FIG. 11 shows an example of an interpolation unit supporting LDR and HDRinputs forming part of the decoder shown in FIG. 3 .

FIG. 12 shows an alternative example of an interpolation unit supportingLDR and HDR inputs forming part of the decoder shown in FIG. 3 .

FIG. 13 shows an example integrated circuit manufacturing system.

DETAILED DESCRIPTION

The present disclosure is directed to interpolation units forinterpolating between a pair of endpoints specified according to theAdaptive Scalable Texture Compression (ASTC) format. The interpolationunits can interpolate between a pair of endpoints to calculate a colourvalue for a texel encoded according to the ASTC format. Exampleinterpolation units are described that are optimised to support only theinterpolation of endpoints for texels encoded using low dynamic range(LDR). Example interpolation units are also described that are optimisedto support the interpolation of endpoints for texels encoded usingeither low dynamic range (LDR) or high dynamic range (HDR).

As described above, endpoints of each endpoint pair may comprise one ormore (e.g. up to four) endpoint components. Conventionally, theinterpolation between two endpoint components E₀ and E₁ according to theASTC format is calculated according to the equation:P=└(E ₀·(64−i)+E ₁ ·i+32)/64┘  (1)where P is the calculated interpolated result and i is the weightingindex.

The endpoint components E₀ and E₁ are each 16-bit unsigned normalisedintegers (i.e., 16-bit UNORM values). Each endpoint component E₀ and E₁is formed from colour endpoint components C₀ and C₁ respectively. Eachcolour endpoint component may be either an 8-bit UNORM value (for LDRendpoints) or a 12-bit UNORM value (for HDR endpoints). ConventionalASTC interpolator units that interpolate between the 16-bit endpointcomponents E₀ and E₁ using the weighting index i therefore typicallyrequire an interpolator capable of interpolating between two 16-bitvalues.

However, it has been appreciated that the interpolated result P can becalculated by instead interpolating between the lower-bit colourendpoint components C₀ and C₁ using the weighting index i to generate anintermediate interpolated result, and then performing logical processingoperations on that intermediate result to calculate the result P. Theinterpolation units described herein include an interpolator tointerpolate between the components C₀ and C₁ to generate theintermediate result, and additional combinational logic circuitry toconvert that intermediate result to the interpolation result P. Byperforming the interpolation between the lower-bit colour endpointcomponents C₀ and C₁ rather than the 16-bit values E₀ and E₁, the sizeof the interpolator and the time taken to perform the interpolation maybe reduced. Though additional logical processing operations areperformed to convert the intermediate interpolated result to theinterpolated result P, it has been found that these can be performed byrelatively cheap (in terms of size and additional processing time) logiccomponents, meaning the interpolation units described herein can benefitfrom savings in circuitry size and processing time compared toconventional interpolation units. This will be explained in more detailbelow.

As used herein, like reference numerals denote like components.

FIG. 3 shows a schematic illustration of a decoder unit 300 for decodinga texel from a block of texture data encoded according to an ASTCformat.

The decoder comprises a parameter decode unit 302, a colour decode unit304, a weight decode unit 306 and at least one interpolation unit 308.The parameter decode unit is coupled to the colour decode unit and theweight decode unit. In particular, an output of the parameter decodeunit is coupled to an input of both the weight decode unit and colourdecode unit. Each of the colour decode unit and the weight decode unitare coupled to the at least one interpolation unit. More specifically,an output of the weight and colour decode units is coupled to an inputof the interpolation unit(s).

The decoder 300 is configured to receive as an input a block ofASTC-encoded texture data, shown at 310. As mentioned above, the blockhas a size, or memory footprint, of 128 bits. The texture data block 310encodes texel colours for an n by m block of texels. That n by m blockof texels may form part of a compressed image, or texture. The texturemay be composed of a plurality of such texture blocks, with each ofthose blocks being encoded in a respective 128-bit data block. Thenumber of texels represented by block of texture data is referred to asthe block footprint. The dimensions of the block (i.e. the values of nand m) are selectable from a number of fixed alternatives specified bythe ASTC standard.

The decoder operates to decode texels from the texture block 310. Thedecoder may operate to decode the texels according to a decodingprocess. That decoding process may comprise a series of decoding steps,or operations. The series of steps undergone to decode a particulartexel may be referred to as a decoding pipeline. Thus, the decoder 300may operate to decode texels from block 310, where each texel is decodedaccording to decoding pipeline.

In the following example, for the purposes of illustration the block oftexture data 310 represents a 12 by 12 block of texels (illustrated inFIG. 4 at 402). A texel to be decoded is shown at 404 for the purpose ofillustration.

The parameter decode unit 302 receives the data block 310. The parameterdecode unit operates to decode configuration data for the block 310. Theconfiguration data may be data that specifies parameters of the texturedata and its encoding within the block 310. The configuration data couldinclude, for example: the size of the weight grid and/or the range ofthe weight values; the partition count (i.e. the number of partitionsfor the data block 310) and the colour endpoint modes (including anindication of whether the endpoint modes are LDR or HDR).

An example of the parameter decode unit 302 is shown in more detail inFIG. 5 . As shown, the parameter decode unit 302 comprises a block modeunit 502; a colour endpoint unit 504 and a partition index unit 506.

The block mode unit 502 is configured to decode a portion of theconfiguration data including the weight grid size (its height and width,i.e. its dimensions) and the range of weight values that can be occupiedby the weights of the weight grid.

The partition index unit 506 is configured to calculate a partitionindex for the texel to be decoded from the data block 310. The partitionindex identifies which partition the texel belongs to, and is an exampleof a configuration parameter.

The partition index for each texel is computed from a seed, thepartition count and the coordinate of the texel within the texel block402. The seed, partition count and texel coordinates may be referred toas intermediate configuration data since they are examples of data thatare used in order to decode a configuration parameter (the partitionindex), but are themselves not configuration parameters. The partitioncount is decoded from the data block 310 by a partition count unit 510that forms part of the partition index unit 506. The seed is computed bya seed computation block 508 from a partition pattern index decoded fromthe data block 310. The coordinates of the texels are computed by atexel coordinate unit (TCU) 512. The TCU 212 may comprise hardware forcalculating the coordinates of the texel 404 being decoded. Thepartition index unit comprises an index calculator 514 for calculatingthe partition index from the seed, partition count and texelcoordinates. The index calculator calculates a partition index for texel404 being decoded.

The colour endpoint unit 504 is configured to decode the colour endpointmodes from the data block 310. In the case that the texture data has apartition count greater than one (i.e. there are multiple partitions),the colour endpoint unit may decode the colour endpoint mode for eachpartition. As described above, the colour endpoint modes specify howcolour values decoded from the block 310 are to be converted into colourendpoints. In general, the ASTC specification specifies 16 possiblecolour endpoint modes, where the modes require differing numbers ofcolour values to form a colour endpoint. In particular, four of themodes form a single colour endpoint from a single colour value (e.g.luminance), and thus require two colour values for each colour endpointpair; four of the modes form a single colour endpoint from two colourvalues, and thus require four colour values for each colour endpointpair; four of the modes require three colour values to form each colourendpoint, and thus require 6 colour values for each colour endpointpair; and four of the modes require four colour values to form a singlecolour endpoint (e.g. RGBA), and thus require 8 colour values for eachcolour endpoint pair.

The colour decode unit 304 decodes colour endpoint data for the texel404 being decoded from the data block 310 using the configuration datadecoded from the data block 310. The colour endpoint data includes thecolour endpoint pair for texel 404 being decoded. If the block of data310 has a partition count of one, then each of the texels to be decodedis associated with the same colour endpoint pair. The colour endpointdata may include up to eight colour endpoints forming four colourendpoint pairs (for a partition count of four—i.e. one colour endpointpair per partition). One or more of the colour endpoint pairs may beassociated with multiple texels of the group of texels to be decodedfrom the data block 310; i.e. some of the texels to be decoded may sharea common colour endpoint pair.

An example structure of the colour decode unit 304 is shown in FIG. 6 .The colour decode unit comprises a colour data selector unit (CDSU) 602,a sequence decoder unit 608, a colour de-quantising unit 604 and acolour endpoint calculation unit 606.

The CDSU 602 is configured to determine the size of the colour datawithin the data block 310, i.e. the size of the data within the block310 used to represent the colour endpoints. In ASTC, the colour data isencoded within a data block as a variable length bit string. The colourdata is encoded according to a bounded integer sequence encoding (BISE)scheme. The size of the colour data can be determined from the partitioncount (decoded by the partition count unit 510) and the block mode datadecoded by the block mode unit 502. The CDSU 602 may also decode thelocation of the colour data within the data block 310. This informationmay again be determined from the partition count and the block modedata.

The sequence decoder unit 608 is configured to perform integer sequencedecoding of the colour data. As mentioned above, the colour data isencoded within a data block according to a binary integer sequenceencoding (BISE) scheme. The use of the BISE scheme enables colour valuesto be encoded in a fractional number of bits. A sequence of values canbe represented using trits (base-3 representation) or quints (base-5representation). Other base representations may also be used.

The colour de-quantising unit 604 is configured to extract the colourvalues from the decoded colour data and to de-quantise those colourvalues.

The endpoint calculation unit 606 is configured to convert thede-quantised colour values decoded by the de-quantising unit 604 into aset of colour endpoints. The endpoint calculation unit 606 may calculatethe pair of colour endpoints for each given texel using the partitionindex and associated colour endpoint mode for that texel.

The endpoint calculation unit 606 may output the pair of colourendpoints for the texel being decoded from the block 310. To do this,the endpoint calculation unit 606 may select an endpoint pair from theset of colour endpoints using the partition index for the texel beingdecoded. Alternatively, it may output the colour endpoints for eachpartition and a partition index for the texel.

The weight decode unit 306 decodes interpolation weight data for thetexel being decoded from the block 310 using the configuration datadecoded by the parameter decode unit 302. Thus, the weight decode unitmay decode a weight for each texel being decoded from the block 310.These weight values are received by the interpolation unit(s) 308. Theweight value for a given texel is denoted herein as i, and may also bereferred to as a weight index. The range of weight values in ASTC mayvary in principle but is typically limited to 0 to 64. The weight indexmay therefore be formed of any specified number of bits but is typicallylimited to seven bits (the minimum number of bits needed to representthe value 64).

FIG. 7 shows an example internal structure for the weight decode unit306. Here, the weight decode unit comprises a scaling unit 702; a weightdata selector unit (WDSU) 704; a sequence decoder unit 718, a weightde-quantisation unit 706 and a weight interpolation unit 708. Thescaling unit 702 is coupled to the WDSU 704; the WDSU is coupled to thede-quantising unit 706 and the de-quantising unit is coupled to theweight interpolation unit 708.

The scaling unit 702 is configured to identify weights of the weightgrid to be used in an interpolation so as to generate the weight index ifor the texel 404 being decoded. The scaling unit 702 may identify a setof weights from the weight grid for the texel being decoded. Each set ofweights can then be interpolated by unit 708 to generate the finalweight index i for the texel.

As described above, depending on the size of the block footprint aweight may not be explicitly stored for each texel represented by thedata block 310. For larger block footprints (e.g. 12 by 12 texels), theweight grid is of a sparser resolution than the block dimensions. Insuch cases, in order to derive a weight for each texel, the texel'scoordinates are scaled to the dimensions of the weight grid and then aweight interpolation is performed for each texel in order to calculate afinal weight for those texels.

The scaling unit 702 comprises a scaling factor unit 710 and a weightselector unit 712. The scaling factor unit 710 decodes the scalingfactor that scales the size of the weight grid to the size of the blockfootprint from the data block 310. The weight selector unit 712 uses thescaling factor to scale the coordinates of the texel 404 being decodedto the weight grid and to select the weights of the weight grid to beused in an interpolation to calculate the final weight index i for thetexel. The same scale factor as calculated by scale factor unit 710 isused by the weight selector unit 712 to scale the coordinates of thetexel 404.

This process is illustrated schematically in FIG. 8 . A 6 by 6 blockfootprint of texels is shown by the ‘cross’ markings (denoted generallyat 802) and a 5 by 5 weight grid is shown by the ‘dot’ markings anddenoted generally at 804. The weight grid is therefore of a lowerresolution than the dimensions of the block footprint. The blockfootprint and the weight grid are shown overlapped with each other forthe purposes of illustration. A scaling factor is then applied to thecoordinates of the texels to re-scale the block footprint to thedimensions of the weight grid. The result of applying this scale factoris shown generally at 806. In this example the scaling factor has beenapplied to all the texels in the block footprint (rather than just theselected texel being decoded) for the purposes of illustration. There-scaled texel coordinates are then used to select a set of weights ofthe weight grid to interpolate in order to calculate a final weightindex for each texel. For example, the coordinates of some texel A(circled for identification) are re-scaled from position 808 to position810. The set of weights 812, 814, 816 and 818 are then selected forinterpolation to generate a final weight index for texel A using there-scaled position of that texel with respect to the weight grid.

The weight data selector unit 704 determines the size of the weight datawithin the block and the location of the data for the selected weightsof the weight grid to be used in the weight interpolation for the texelbeing decoded.

The WDSU comprises a weight data size unit 714 and a weight locator unit716. The data size unit 714 is configured to determine the size of theweight data within the block 310. The data size unit 714 determines thisbased on the weight value ranges and the size of the weight grid asdecoded by the block mode unit 502.

The weight locator unit 716 is configured to locate the weight datawithin the block 310 for each set of weights to be used in the weightinterpolation for the texel 404 being decoded.

Like the colour data, the weight data may also be BISE encoded. Thesequence decoder unit 718 is configured to perform binary integersequence decoding of the weight data.

The weight de-quantization unit 706 is configured to de-quantise thedecoded set of weights for texel 404 (that is, return each of theweights to their original range from their encoded range).

The weight interpolation unit 708 is configured to interpolate the setof weights for the texel 404 being decoded to calculate for that texelthe final interpolation weight index i (e.g. a final interpolationweight per plane for the texel).

The final weight index i for the texel 404 being decoded is then outputfrom the weight decode unit 306.

The interpolation unit(s) 308 calculate a colour value for the texel 404being decoded using the colour endpoint data for the texel calculated byunit 306 and the weight index i for the texel calculated by the unit304.

Examples of the interpolation unit 308 will now be described. Theexamples are broadly classified into two groups: a first group thatsupports only an LDR mode of operation, and a second group that supportsboth an LDR and HDR mode of operation. The example interpolation unitssupporting only an LDR mode of operation will be described first.

LDR Mode Only

FIG. 9 shows an example structure of an interpolation unit 900. Theinterpolation unit 900 supports only an LDR mode of operation; i.e. itis configured to only operate on LDR inputs.

The interpolation unit is in the form of a binary logic circuit thatoperates on binary inputs. The binary logic circuit comprises aninterpolation 920 and combinational logic circuitry 904. Theinterpolation unit 920 comprises an interpolator 902 andexception-handling circuitry 918. The combinational logic circuitry 904comprises formatting circuitry 906; a shifter and adder logic unit 908;an additional logic unit 910 and a shifter 912. The binary logic circuit900 is configured to calculate an interpolation between endpointcomponents E₀ and E₁ using weighting index i output from the weightdecode unit 306 to form an interpolated result, P. The value of P is asspecified above by equation (1), repeated here for reference:P=└(E ₀·(64−i)+E ₁ ·i+32)/64┘  (1)

Each of components E₀ and E₁ are components of a respective endpointthat form an endpoint pair. In the context of this example, thatendpoint pair is the endpoint pair for texel 404 being decoded. Theweight index i is the weight index for the texel 404. The interpolatedresult may be, or more generally may be indicative of, a colourcomponent value for the texel 404.

Endpoint components E₀ and E₁ are formed from LDR colour endpointcomponents C₀ and C₁ respectively for the texel 404 determined by thecolour decode unit 304. In particular, endpoint component E₀ is formedfrom an expansion of colour endpoint component C₀, and endpointcomponent E₁ is formed from an expansion of colour endpoint componentC₁. As mentioned above, the endpoint components E₀,E₁ represent 16-bitUNORM values and the LDR colour endpoint components C₀,C₁ represent8-bit UNORM values. Thus, to clarify, it is noted that the values E₀,E₁, C₀, C₁ and i are unsigned binary integers.

Interpolation unit 920 is configured to receive as inputs the colourendpoint components C₀ and C₁ for the texel 404, the weight index i forthe texel and, optionally, the value i_(max)−i, where i_(max) is themaximum value of the weight index permitted by the specified range. Asdescribed above, that maximum value is typically 64. In an alternativearrangement, the interpolator may calculate the value of i_(max−i) fromthe received index i and knowledge of the value i_(max).

In contrast to conventional ASTC decoders, interpolation unit 920 doesnot perform an interpolation using the expanded 16-bit endpointcomponents E₀ and E₁, but instead performs an interpolation between the8-bit values C₀ and C₁ using the weighting index i to form anintermediate interpolation result. This interpolation is performed usingthe interpolator 902 for non-exception values of the weighting index i,and by the exception-handling circuity 918 for exception values of i.The combinational logic circuitry 904 operates to generate the finalinterpolated result P from this intermediate result. This will now beexplained in more detail.

The ASTC standard specifies that, for LDR inputs, interpolated results(e.g. colour values for texels) may either be compatible with an sRGBcolour space or incompatible with the sRGB colour space. Compatible withthe sRGB colour space may mean that the interpolated result can beconverted to the sRGB colour space, and incompatible with the sRGBcolour space may mean that the interpolated result cannot be correctlyconverted to the sRGB colour space. Compatibility of an interpolatedresult with the sRGB colour space may equivalently be expressed bysaying that conversion to the sRGB colour space is enabled; andincompatibility with the sRGB colour space may equivalently be expressedby saying that conversion to the sRGB colour space is not enabled (i.e.is disabled). The ASTC standard specifies that, when conversion of adecoded colour value to the sRGB colour space is disabled, the colourendpoint components C₀ and C₁ are expanded to E₀ and E₁ respectively bybit replication, i.e.E ₀=(C ₀<<8)|C ₀ =C ₀

C ₀  (2)E ₁=(C ₁<<8)|C ₁ =C ₁

C ₁  (3)

In equations (2) and (3), <<denotes left-shifting and

denotes concatenation. In other words, the endpoint component E₀ isformed from the concatenation of C₀ with itself, and the endpointcomponent E₁ is formed from the concatenation of C₁ with itself.

In contrast, when conversion of a decoded colour value to the sRGBcolour space is enabled, the colour endpoint components C₀ and C₁ areexpanded to E₀ and E₁ respectively by concatenation with the 8-bitbinary string representing the value 128, i.e.E ₀=(C ₀<<8)|128=C ₀

0b10000000  (4)E ₁=(C ₁<<8)|128=C ₁

0b10000000  (5)

By substituting equations (2) and (3) into equation (1), it can be seenthat an alternative expression for calculating the interpolated result P(for the case that conversion to the sRGB colour space is disabled) isgiven by:P=└(E ₀·(64−i)+E ₁ ·i+32)/65┘=└((C ₀

C ₀)·(64−i)+(C ₁

C ₁)·i+=)/64┘=└((C ₀·(64−i)+C₁ ·i)<<8+(C ₀·(64−i)+C ₁ ·i+32))/64┘=└((C₂<<8)+C ₂+32)/64┘  (6)whereC ₂ =C ₀·(64−i)+C ₁ ·i  (7)

Similarly, by substituting equations (3) and (4) into equation (1), itcan be seen that an alternative expression for calculating theinterpolated result P (for the case that conversion to the sRGB colourspace is enabled) is given by:P=└(E ₀·(64−i)+E ₁ ·i+32)/64┘=└((C ₀

128)·(64−i)+(C ₁

128)·i+32)/64┘=└((C ₀·(64−i)+C ₁ ·i)<<8+(128·(64−i)+128·i)+32)/64┘=└((C₂<<8)+128.64+=)/64┘  (8)where again C₂=C₀·(64−i)+C_(i)·i.

The range of values for the weight index i is limited to 0-64, whichenables the case where i=64 to be treated as an exception case.

It can be seen from equation (7) that when i<64 (a non-exception case):C ₂ =C ₂ ^(exc) =C ₀·(64−i)+C ₁ ·i  (9)

And when i=64 (the exception case):C ₂ =C ₂ ^(exc) =C _(i) ·i  (10)

Interpolator 902 operates to interpolate between inputs C₀ and C₁ usingweight index i to calculate the intermediate interpolation result C₂^(exc) by implementing equation (9). Thus, conveniently, theinterpolator 902 operates on 8-bit components C₀ and C₁ rather than16-bit endpoint components E₀ and E₁ as in conventional interpolators,meaning the size of the interpolator 902 can be reduced compared toconventional interpolators.

The binary logic circuit can be configured so that the interpolator 902receives only the six least significant bits of the weight index i(which enables the interpolator to perform an interpolation for thenon-exception values of the weight index i in the range 0-63). In otherwords, the interpolator 902 can perform the interpolation to generatethe intermediate result C₂ ^(exc) using the six least significant bitsof the weight index i in accordance with equation (9) if i<64. Theresult of the interpolator 902 will be arbitrary when i=64.

Exception cases (i=64) are handled by exception-handling circuitry 918.The exception handling circuitry 918 is configured to generate theintermediate result C₂ ^(exc) in accordance with equation (10) wheni=64. The exception handling circuitry 918 receives as an input thevalue C₁ and generates from this input the intermediate result C₂^(exc). The circuitry 918 takes the form of a shifter that is configuredto left-shift the input C₁ by six bits (equivalent to multiplying theinput C₁ by 64) to generate the intermediate result C₂ ^(exc) when i=64.

The intermediate interpolation results C₂ ^(exc) and C₂ ^(exc) are inputinto the combinational logic circuitry 904 which operates to generatethe final interpolation result P in accordance with either equation (6)or (8) depending on whether conversion to the sRGB colour space isenabled or disabled. In other words, the combinational logic circuitry904 generates the final interpolation result P by implementing eitherequations (6) or (8). In more detail, the intermediate interpolationresults C₂ ^(exc) and C₂ ^(exc) are received by the formatting circuitry906. The formatting circuitry 906 operates to generate furtherintermediate results C₂ ′ and C₂′ in dependence on whether conversion ofcolour data to sRGB is enabled. It obtains result C₂″ in a way thatdepends on whether the weighting index i has the exception value 64.

The formatting circuitry 906 comprises a logic unit 914 and a selectionunit 916. Logic nit 914 is configured to receive as an input theintermediate results C₂ ^(exc) and C₂ ^(exc) and a signal indicatingwhether conversion to the sRGB colour space is enabled or disabled(which may be referred to as an sRGB signal). The signal may for examplebe a binary flag, where a first value of the flag indicates thatconversion to sRGB is enabled and a second value of the flag indicatesthat conversion to sRGB is not enabled. The logic unit 914 is configuredto generate output result C₂ ′ equal to the intermediate interpolatedresult C₂ ^(exc) if the sRGB signal indicates that conversion to sRGB isnot enabled, and equal to C₂ ^(exc) +32 if the sRGB signal indicatesthat conversion to sRGB is enabled. The logic unit 914 further generatesthe output result C₂′ equal to the intermediate interpolated result C₂^(exc) if the sRGB signal indicates that conversion to sRGB is notenabled, and equal to C₂ ^(exc)+32 if the sRGB signal indicates thatconversion to sRGB is enabled.

In other words, the logic unit 914 is configured to generate outputintermediate results:

$\begin{matrix}{C_{2}^{\prime} = \left\{ {{\begin{matrix}{{C_{2}^{exc}{if}\overset{\_}{sRGB}{and}i} = 64} \\{{C_{2}^{exc} + {32{if}{sRGB}{and}i}} = 64}\end{matrix}\overset{\_}{C_{2}^{\prime}}} = \left\{ \begin{matrix}{{C_{2}^{\overset{\_}{exc}}{if}\overset{\_}{sRGB}{and}i} < 64} \\{{C_{2}^{\overset{\_}{exc}} + {32{if}{sRGB}{and}i}} < 64}\end{matrix} \right.} \right.} & (11)\end{matrix}$

In equation (11), the notation ‘sRGB’ means that conversion to sRGB isenabled, and ‘sRGB’ means that conversion to sRGB is not enabled.

The generated intermediate results are input into selection unit 916.The selection unit 916 operates to generate a further intermediateresult (denoted C₂″), where the intermediate result C₂″ depends onwhether the index i is equal to the exception value 64 or is less than64. The selection unit 916 receives as inputs: (i) the intermediateresults C₂′ and C₂′ generated by the logic unit 914; and (ii) theweighting index i. The selection unit 916 is configured to generate theoutput C₂″ to be equal to one of the intermediate results C₂′ and C₂′ independence on the weighting index i. In other words, the selection unit916 handles the exception case by outputting C₂′ if i<64 and theexception result C₂′ when i=64, which are as follows:

$\begin{matrix}{C_{2}^{''} = \left\{ \begin{matrix}{C_{2} = {C_{1}{{{6{if}\overset{\_}{sRGB}{and}i} = 64}}}} \\{{C_{2} + 32} = {{\left( {C_{1}{6}} \right) + {32{if}{sRGB}{and}i}} = 64}}\end{matrix} \right.} & (12)\end{matrix}$ $\begin{matrix}{C_{2}^{''} = \left\{ \begin{matrix}{C_{2} = {{{C_{0}.\left( {64 - i} \right)} + {{C_{1}.i}{if}\overset{\_}{sRGB}{and}i}} < 64}} \\{{C_{2} + 32} = {{{C_{0}.\left( {64 - i} \right)} + {C_{1}.i} + {32{if}{sRGB}{and}i}} < 64}}\end{matrix} \right.} & (13)\end{matrix}$

Selection unit 916 may therefore be a MUX.

Both exception values in equation (12) are obtained from input C₁ only,using the constant left-shifter 918 and logic unit 914. The selectionunit 916 will select appropriately between non-exception values C₂′ andthe exception values C₂′ based on the input i.

Thus, the combination of the logic unit 914, shifter unit 918, andselection unit 916 of the formatting circuitry 906 operate to generatethe intermediate interpolated result C₂″ as: (i) the C₂ when conversionof colour data to sRGB colour space is not enabled; (ii) the summationof the result C₂ and a numerical constant (32 in this implementation)when conversion of colour data to sRGB colour space is enabled.

Mathematically:

$\begin{matrix}{C_{2}^{''} = \left\{ \begin{matrix}{C_{2}{if}\overset{\_}{sRGB}} \\{C_{2} + {32{if}{sRGB}}}\end{matrix} \right.} & (14)\end{matrix}$

The intermediate interpolated result C₂″ output from formattingcircuitry 906 is input into shifter and adder logic unit 908.

Unit 908 is configured to left-shift the intermediate result C₂″ by anumber of bits equal to the number of bits of each colour endpointcomponent C₀,C₁ (i.e., 8 bits in this example) to generate a shiftedresult, and to add to the shifted result a numerical constant (in thisexample 32) to generate a further intermediate interpolated result C₂′″.

Mathematically, the unit 908 generates the intermediate result C₂′″ byperforming the following operation:C ₂′″=(C ₂″<<8)+32  (15)

Substituting in the values of C₂″ given by equation (14), it can be seenthe value of C₂′″ calculated by unit 908 is equal to one of two valuesin dependence on whether the conversion to sRGB is enabled:

$\begin{matrix}{C_{2}^{\prime\prime\prime} = {{\left( {C_{2}^{''}{8}} \right) + 32} = \left\{ \begin{matrix}{\left( {C_{2}{8}} \right) + {32{if}\overset{\_}{sRGB}}} \\{\left( {\left( {C_{2} + 32} \right){8}} \right) + {32{if}{SRGB}}}\end{matrix} \right.}} & (16)\end{matrix}$

It is noted that 2¹³=128.64, and thus:

$\begin{matrix}{C_{2}^{\prime\prime\prime} = \left\{ \begin{matrix}{\left( {C_{2}{8}} \right) + {32{if}\overset{\_}{sRGB}}} \\{\left( {C_{2}{8}} \right) + 128.64 + {32{if}{sRGB}}}\end{matrix} \right.} & (17)\end{matrix}$

The intermediate result C₂′″ is output to logic unit 910. The logic unit910 is configured to output a further intermediate result C₂ ^(iv). Thelogic unit 910 receives as an input the intermediate signal C₂″ outputby the formatting circuitry 906. The unit 910 also receives as an inputthe sRGB signal. The logic unit 910 is configured to conditionally addthe intermediate result C₂″ to the intermediate result C₂′″ independence on whether conversion to sRGB is enabled. Specifically, logicunit 910 is configured to add the intermediate result C₂″ to thereceived intermediate result C₂′″ if sRGB conversion is not enabled toform intermediate result C₂ ^(iv), and to output intermediate result C₂^(iv) equal to C₂′″ if sRGB conversion is enabled.

Expressed mathematically, the logic unit 910 is configured to output theintermediate result C₂ ^(iv) calculated as:

$\begin{matrix}{C_{2}^{iv} = \left\{ \begin{matrix}{C_{2}^{\prime\prime\prime} = {\left( {C_{2}{8}} \right) + 128.64 + {32{if}{sRGB}}}} \\{{C_{2}^{\prime\prime\prime} + C_{2}^{''}} = {\left( {C_{2}{8}} \right) + 32 + {C_{2}{if}\overset{\_}{sRGB}}}}\end{matrix} \right.} & (18)\end{matrix}$

The intermediate result C₂ ^(iv) is input into shifter 912. Shifter 912is configured to right-shift the input C₂ ^(iv) to generate the finalinterpolated result P. In this example, shifter 912 is configured toright-shift the input C₂ ^(iv) by 6 bits, which is equivalent todividing the input by the numerical value of 64 and rounding thequotient to the greatest integer less than or equal to it. Thus, thevalue of P output by the combinational logic circuitry is equal to:

$\begin{matrix}{{{{P = C_{2}^{iv}}}6} = {\left\lfloor {C_{2}^{iv}/64} \right\rfloor = \left\{ \begin{matrix}{\left\lfloor {\left( {\left( {C_{2}{8}} \right) + 128.64 + 32} \right)/64} \right\rfloor{if}{sRGB}} \\{\left\lfloor {\left( {\left( {C_{2}{8}} \right) + 32 + C_{2}} \right)/64} \right\rfloor{if}\overset{\_}{sRGB}}\end{matrix} \right.}} & (19)\end{matrix}$

A comparison of equation (19) with equations (6) and (8) demonstratesthat the binary logic circuit 900 has correctly calculated the finalinterpolation result P for both cases where conversion to sRGB isenabled and cases where conversion to sRGB is not enabled, for allnon-negative integer weighting indices i≤64.

FIG. 10 shows an alternative structure of an interpolation unit 1000that supports only an LDR mode of operation. The interpolation unit 1000is again in the form of a binary logic circuit.

The binary logic circuit comprises interpolation unit 920 andcombinational logic circuitry 1004. The combinational logic circuitry1004 comprises formatting circuitry 1006; a shifter and adder logic unit908; an additional logic unit 910 and a shifter 912. The differencesbetween binary logic circuit 900 and 1000 reside in the formattingcircuitry, which will now be explained in more detail.

The interpolation unit 920 outputs the intermediate interpolation resultC₂. In particular, interpolator 902 outputs intermediate interpolationresult C₂ ^(exc) in accordance with equation (9) if i<64 as describedabove and exception handling circuitry 918 generates the intermediateresult C₂ ^(exc) in accordance with equation (10) when i=64 as describedabove.

The combinational logic circuitry 1004 receives the intermediate resultsC₂ ^(exc) and C₂ ^(exc) and performs a set of logical processingoperations to generate the final interpolation result P in accordancewith, e.g. by implementing, equations (6) and (8).

Formatting circuitry 1004 receives the intermediate results C₂ ^(exc)and C₂ ^(exc) and operates to generate the further intermediate resultC₂″ from these inputs dependent on whether conversion of colour data tosRGB is enabled. It obtains the result C₂″ in a way that depends onwhether the weighting index i has a value equal to the exception value.

The formatting circuitry 1006 comprises selection unit 1008 and logicunit 1010. Selection unit 1008 operates to generate a furtherintermediate result C₂′, where the intermediate result C₂′ is selectedfrom the output of either the interpolator 902 or the exception caseshifter 918 depending on whether the index i is equal to the exceptionvalue (i=64) or is not equal to an exception value (i.e. i<64). In otherwords, the selection unit 1008 handles exception cases by outputting anintermediate result C₂′ as calculated by different hardware branchesdepending if the weighting index is equal to an exception value or ifthe weighting index is not equal to an exception value. Specifically,the selecting unit receives as inputs: (i) the intermediate results C₂^(exc) and C₂ ^(exc) generated by the interpolator 902 and circuitry 918respectively; and (ii) the weighting index i. The selection unit 916 isconfigured to generate the output C₂″ to be equal to one of theintermediate results C₂′ and C₂′ in dependence on the weighting index i.In other words, the selection unit 916 handles the exception case byoutputting the non-exception values C₂′ if i<64 and the exception resultC₂′ when i=64, which are as follows:

$\begin{matrix}{C_{2}^{\prime} = \left\{ \begin{matrix}{C_{2} = {C_{1}{{{6{if}i} = 64}}}} \\{C_{2} = {{{C_{0}.\left( {64 - i} \right)} + {{C_{1}.i}{if}i}} < 64}}\end{matrix} \right.} & (20)\end{matrix}$

Selection unit 916 may therefore be a MUX.

The further intermediate result C₂′ is input into logic unit 1010. Logicunit 1010 further receives as an input the sRGB signal. The logic unit1010 is configured to generate a further intermediate result C₂″ equalto the received intermediate result C₂′ if the sRGB signal indicatesthat conversion to sRGB is not enabled, and to generate an output resultC₂″=C₂′+32 if the sRGB signal indicates that conversion to sRGB isenabled. In other words, the logic unit 1010 is configured to generatean output result C₂″, where:

$\begin{matrix}{C_{2}^{''} = \left\{ \begin{matrix}{C_{2}^{\prime} = {C_{2}{if}\overset{\_}{sRGB}}} \\{{C_{2}^{\prime} + 32} = {{C_{2} + {32{if}{sRGB}}} =}}\end{matrix} \right.} & (21)\end{matrix}$

The logic unit 1010 operates to generate the intermediate interpolatedresult C₂″ as: (i) the C₂ when conversion of colour data to sRGB colourspace is not enabled; (ii) the summation of the result C₂ and anumerical constant (32 in this implementation) when conversion of colourdata to sRGB colour space is enabled.

Formatting circuitry 1006 differs from formatting circuitry 906 in thatthe order of the selection unit and logic unit in circuitry 1006 isreversed compared to circuitry 906. However, a comparison of equations(21) and (14) demonstrates that both types of circuitry receive the sameintermediate results C₂ ^(exc) and C₂ ^(exc) and output the same furtherintermediate result C₂″.

The remaining components 908 to 912 of circuit 1000 are equivalent tothose in circuit 900, and so a description of these components will notbe repeated here.

Example interpolation units will now be described that support both LDRand HDR modes of operation.

LDR and HDR Mode

FIG. 11 shows an example structure of an interpolation unit 1100. Theinterpolation unit 1100 supports both an LDR mode of operation and anHDR mode of operation; i.e. it is configured to operate on both LDR andHDR inputs.

The interpolation unit 1100 is in the form of a binary logic circuitthat operates on binary inputs. The binary logic circuit comprises aninterpolation unit 1120 and combinational logic circuitry 1104. Theinterpolation unit 1120 comprises interpolator 1102 andexception-handling circuitry 918. The combinational logic circuitry 1104comprises formatting circuitry 906; a first circuit branch 1106 and asecond circuit branch 1108. The first circuit branch 1106 comprisesshifter and adder logic unit 908; additional logic unit 910 and shifter912. The binary logic circuit 900 is configured to perform aninterpolation calculation between endpoint components E₀ and E₁ usingweighting index i output from the weight decode unit 306 to form aninterpolated result, P. Endpoints E₀ and E₁ may be either LDR inputs orHDR inputs. The value of P is as specified above by equation (1),repeated again here for reference:P=└(E ₀·(64−i)+E ₁ ·i+32)/64┘  (1)

Endpoints E₀ and E₁ are again UNORM 16 bit values. E₀ is formed from anexpansion of colour endpoint component C₀ and E₁ is formed from anexpansion of colour endpoint component C₁.

When the colour endpoint components C₀ and C₁ are 8-bit LDR inputs, theexpansion to E₀ and E₁ respectively is given by equations (2) and (3)above.

When the colour endpoint components C₀, C₁ are instead HDR inputs, theyare UNORM 12-bit values. The ASTC standard specifies that when C₀ and C₁are HDR inputs, the expansion to the 16-bit values E₀ and E₁respectively is performed by zero-padding, i.e.E ₀ =C ₀<<4=C ₀

0b0000  (22)E ₁ =C ₁<<4=C ₁

0b0000  (23)

In other words, endpoint component E₀ is formed by left-shifting colourendpoint component C₀ by four bits, and E₁ is formed by left-shiftingcolour endpoint component C₁ by four bits. It is noted that conversionto sRGB is not enabled for the HDR mode of operation, and equations (18)and (19) represent the single way of expanding 12-bit HDR inputs to16-bit values as mandated by the ASTC specification.

By substituting equations (22) and (23) into equation (1), it can beseen that an alternative expression for calculating the interpolatedresult P for HDR inputs is given by:p=└(E ₀·(64−i)+E ₁ ·i+32)/64┘=└((C ₀<<4)·(64−i)+(C ₁<<4)·i+32)/64┘=└((C₀·(64−i)+C ₁ ·i)<<4+=)/64┘=└((C ₂<<4)+32)/64┘=└((C₂+(32××4))<<4)/64┘=((C ₂+2)>>2  (24)where again C₂=C₀·(64−i)+C₁·i.

The interpolator 1102 of the interpolation unit 1120 operates tointerpolate between inputs C₀ and C₁ using weight index i to calculatethe intermediate interpolation result C₂ ^(exc) in accordance with, e.g.by implementing, equation (9) when i<64.

Exception cases (i=64) are handled by exception-handling circuitry 918of the interpolation unit 1120. The exception handling circuitry 918 isconfigured to generate the intermediate result C₂ ^(exc) in accordancewith equation (10) when i=64. The exception handling circuitry 918receives as an input the value C₁ and generates from this input theintermediate result C₂ ^(exc). The circuitry 918 takes the form of ashifter that is configured to left-shift the input C₁ by six bits(equivalent to multiplying the input C₁ by 64) to generate theintermediate result C₂ ^(exc) when i=64.

The intermediate results C₂ ^(exc) and C₂ ^(exc) are received by thecombinational logic circuitry 1104 which performs one or more logicalprocessing operations to calculate the interpolation result P. For LDRinputs, the combination logic circuitry 1104 calculates theinterpolation result P in accordance with, e.g. by implementing, eitherequations (6) or (8) above depending on whether conversion to sRGB isenabled or disabled.

For HDR inputs, the combination logic circuitry 1104 calculates theinterpolation result P in accordance with equation (24).

It is noted that for both LDR and HDR inputs, an equivalent mathematicalinterpolation is performed between endpoint components C₀ and C₁ tocalculate the intermediate interpolation result C₂ ^(exc) , where theendpoint components are 8-bit values when LDR and 12-bit values whenHDR. Thus, interpolator 1102 can be configured to interpolate betweeninputs C₀ and C₁ using weight index i to calculate the intermediateinterpolation result C₂ ^(exc) for both LDR and HDR inputs when i<64. Toenable the interpolator 1102 to operate on both LDR and HDR inputs, theinterpolator 1102 is configured to operate on the larger-size 12-bit HDRinputs. It is noted that 8-bit LDR colour endpoint components C₀ and C₁may therefore be formatted prior to being input to the interpolator 1102to prepend four zero bits to the most significant bit. That is, the8-bit LDR endpoints C₀ and C₁ may be padded with four zeros to generatea 12-bit value for input to the interpolator 1102. This generates a12-bit input for the interpolator 1102 without changing the numericalvalue of 8-bit endpoint components. This formatting may be performed bya formatting circuitry (e.g. circuitry that performs concatenation witha constant signal) not shown in FIG. 11 .

By optimising the interpolator 1102 to perform the interpolation usingthe six least significant bits of the weight index i and treat the caseof i=64 as an exception result (as described above with reference toFIG. 9 ), interpolator 1102 can be implemented as a 12×6-bitinterpolator. Thus, interpolator 1102 can support both LDR and HDRinputs and still present reductions in hardware size and processing timecompared to conventional ASTC interpolators, which may be 16×6 bits insize.

The intermediate interpolated results C₂ ^(exc) and C₂ ^(exc) calculatedby interpolator 1102 and circuitry 918 respectively are input into theformatting circuitry 906. The formatting circuitry 906 generates afurther intermediate interpolation result C₂″ in same way as thatdescribed above with reference to FIG. 9 . The value of C₂″ is given byequation (14).

The intermediate result C₂″ is then input into the first circuit branch1106. The first circuit branch comprises shifter 908, logic unit 910 andright-shifter 912 which operate in the same way as described above withreference to FIG. 9 . The first circuit branch 1106 outputs aninterpolation result C₂ ^(v) which, for LDR colour endpoint componentsC₀ and C₁, is equal to the value of P specified by equation (19). Thatis, for LDR range inputs, the first circuit branch 1106 generatesinterpolation result C₂ ^(v) given by:

$\begin{matrix}{C_{2}^{v} = \left\{ \begin{matrix}{\left\lfloor {\left( {\left( {C_{2}{8}} \right) + 128.64 + 32} \right)/64} \right\rfloor{if}{sRGB}} \\{\left\lfloor {\left( {\left( {C_{2}{8}} \right) + 32 + C_{2}} \right)/64} \right\rfloor{if}\overset{\_}{sRGB}}\end{matrix} \right.} & (25)\end{matrix}$

In this example, intermediate result C₂″ is also input into the secondcircuit branch 1108. The second circuit branch comprises a logic unit1110 and a right shifter 1112. As this branch concerns the formattingfor HDR inputs only, which only works correctly when sRGB conversion isdisabled, no connection to or provision for sRGB logic is made. In otherwords, the second circuit branch 1108 does not receive as an input thesRGB signal. Logic unit 1110 operates to add a fixed numerical constantto the received input C₂″ to generate a further intermediate result C₂^(vi). In this example, that numerical constant is ‘2’. Logic unit 1110may therefore be an adder unit.

Thus, logic unit 1110 generates an output intermediate result C₂ ^(vi)from the intermediate result C₂″ given by:C ₂ ^(vi) =C ₂″+2  (26)

The intermediate result C₂ ^(vi) is then input into shifter 1112, whichoperates to right-shift the input by two bits to generate theinterpolation result C₂ ^(vii), given by:C ₂ ^(vii)=(C ₂″+2)>>2  (27)

Thus, for HDR inputs, it can be seen from (21) that the second circuitbranch outputs the interpolation result C₂ ^(vii), given by:C ₂ ^(vii)=(C ₂+2)>>2 if sRGB   (28)

A comparison of equation (28) with equation (24) and equation (25) with(19) verifies that the first circuit branch 1106 outputs the correct LDRinterpolation result when colour endpoint components C₀ and C₁ are LDR,and the second circuit branch 1108 outputs the correct HDR interpolationresult when colour endpoint components C₀ and C₁ are HDR and sRGBconversion is disabled. Since sRGB conversion may not be performed inHDR mode, the output from branch 1108 when sRGB conversion is enabled isirrelevant in the context of the ASTC specification.

The LDR interpolation result C₂ ^(v) output from first circuit branch1106 and the HDR interpolation result C₂ ^(vii) output from the secondcircuit branch 1108 are input into selection unit 1114. Selection unit1114 also receives as an input a signal indicating whether the colourendpoint components C₀ and C₁ input to the binary logic circuit 1100 areLDR or HDR inputs. This signal may be referred to as a dynamic range(DR) indication signal. The signal may be a binary flag, where one valueof the flag indicates the colour endpoint components are LDR inputs andanother value of the flag indicates the colour endpoint components areHDR inputs. The selection unit 1114 is configured to output one of thereceived LDR interpolation result C₂ ^(v) 1106 the HDR interpolationresult C₂ ^(vii) as the final interpolation result P in dependence onthe received DR indication signal. Specifically, the selection unit 1114is configured to output the HDR interpolation result C₂ ^(vii) as theinterpolation result P if the DR signal indicates the colour endpointcomponents are HDR, and to output the LDR interpolation result C₂ ^(v)as the interpolation result P if the DR signal indicates the endpointcomponents are LDR.

FIG. 12 shows an alternative binary logic circuit 1200 that supportsboth LDR and HDR modes of operation. Circuit 1200 is a modified versionof circuit 1000 shown in FIG. 10 that includes first and second circuitbranches 1106 and 1108 for calculating an LDR interpolation result C₂^(V) and HDR interpolation result C₂ ^(vii) respectively.

Circuit 1200 includes interpolation unit 1120 that generatesintermediate result C₂. In particular, interpolator 1102 generates theresult C₂ ^(exc) in accordance with equation (9) if i<64 as describedabove, and exception handling circuitry 918 generates the intermediateresult C₂ ^(exc) in accordance with equation (10) when i=64 as describedabove.

Combinational logic circuitry 1204 generates a final interpolationresult P by performing one or more logical processing operations. Thecombinational logic circuitry 1204 comprises formatting circuitry 1006;a first circuit branch 1106 and a second circuit branch 1108. Theformatting circuitry 1006 generates further intermediate result C₂″ inthe same way described above with reference to FIG. 10 . Theintermediate result C₂″ is input into the circuit branches 1106 and1108. The circuit branches 1106 and 1108 operate to generate LDRinterpolation result C₂ ^(v) and HDR interpolation result C₂ ^(vii)respectively in the same way described above with reference to FIG. 11 .Selection unit 1114 then outputs one of the interpolation results independence on the dynamic range (DR) signal as described above withreference to FIG. 11 . Thus, a description of these components will notbe described again here.

In the example shown in FIG. 12 , the second circuit branch 1108receives as its input the intermediate result C₂″. In an alternativeexample, the second circuit branch may receive as its input theintermediate result C₂′ output from the selection unit 1008. This wouldstill enable the circuit branch 1108 to calculate the correctinterpolation result for HDR inputs because, in that case, conversion tosRGB is disabled and so C₂′=C₂″. In general, the second branch unit canreceive as its input any intermediate interpolation result that, for HDRinputs, has a value equal to C₂.

The interpolation units described above with reference to FIGS. 9 to 12operate to calculate an interpolation result between 16-bit endpointcomponents E₀ and E₁ by performing an interpolation using 8 or 12-bitcolour endpoint components C₀ and C₁. This enables the size of theinterpolator and the processing time required to perform theinterpolation to be reduced compared to conventional interpolation unitsthat perform an interpolation using the 16-bit endpoint components.Synthesis results obtained by the inventor have found that aninterpolation unit incorporating a 16×7-bit interpolator supporting theLDR mode only can be provided with a circuit area of 460 μm² and aprocessing time of 0.44 ns, and an interpolation unit incorporating a16×7-bit interpolator supporting LDR and HDR modes can be provided witha circuit area of 503 μm² and a processing time of 0.44 ns. However, ithas been found that a binary logic circuit that supports the LDR modeonly in accordance with the examples described herein can be providedwith a circuit area of 288 μm² and a processing time of 0.28 ns,representing a 37% area and 36% timing improvement. A binary logiccircuit that supports both LDR and HDR modes in accordance with theexamples described herein can be provided with a circuit area of 367 μm²and a processing time of 0.22 ns, representing a 27% area and 49% timingimprovement.

It will be appreciated that modifications may be made to the binarylogic circuit described herein. For example, various examples ofcombinational logic circuitry may be provided to generate theinterpolation result P from the intermediate result C₂ calculated by theinterpolator as specified by equations (19) and (24).

Though the above examples describe an optimisation in which theinterpolator operates on only the six least significant bits of theweight index, in other examples the interpolator may perform theinterpolation using seven bits of the weight index i. In this case, thevalue i=64 is not treated as an exception result, and the formattingcircuitry 906 may be amended to remove the selection unit 916, in whichcase the output of the logic unit 914 is taken as the intermediateresult C₂″ that is input into the logic unit 908. In other words, inthese examples the formatting circuitry generates the intermediateresult C₂″ from the received input value C₂ in dependence on whetherconversion to sRGB is enabled, but not in dependence on the value of theweight index.

The interpolation units of FIGS. 9 to 12 are shown as comprising anumber of functional blocks. This is schematic only and is not intendedto define a strict division between different logic elements of suchentities. Each functional block may be provided in any suitable manner.It is to be understood that intermediate values described herein asbeing formed by a unit need not be physically generated by the unit atany point and may merely represent logical values which convenientlydescribe the processing performed by the unit between its input andoutput.

The interpolation units described herein may be embodied in hardware onan integrated circuit. The interpolation units described herein may beconfigured to perform any of the methods described herein. Generally,any of the functions, methods, techniques or components described abovecan be implemented in software, firmware, hardware (e.g., fixed logiccircuitry), or any combination thereof. The terms “module,”“functionality,” “component”, “element”, “unit”, “block” and “logic” maybe used herein to generally represent software, firmware, hardware, orany combination thereof. In the case of a software implementation, themodule, functionality, component, element, unit, block or logicrepresents program code that performs the specified tasks when executedon a processor. The algorithms and methods described herein could beperformed by one or more processors executing code that causes theprocessor(s) to perform the algorithms/methods. Examples of acomputer-readable storage medium include a random-access memory (RAM),read-only memory (ROM), an optical disc, flash memory, hard disk memory,and other memory devices that may use magnetic, optical, and othertechniques to store instructions or other data and that can be accessedby a machine.

The terms computer program code and computer readable instructions asused herein refer to any kind of executable code for processors,including code expressed in a machine language, an interpreted languageor a scripting language. Executable code includes binary code, machinecode, bytecode, code defining an integrated circuit (such as a hardwaredescription language or netlist), and code expressed in a programminglanguage code such as C, Java or OpenCL. Executable code may be, forexample, any kind of software, firmware, script, module or librarywhich, when suitably executed, processed, interpreted, compiled,executed at a virtual machine or other software environment, cause aprocessor of the computer system at which the executable code issupported to perform the tasks specified by the code.

A processor, computer, or computer system may be any kind of device,machine or dedicated circuit, or collection or portion thereof, withprocessing capability such that it can execute instructions. A processormay be any kind of general purpose or dedicated processor, such as aCPU, GPU, System-on-chip, state machine, media processor, anapplication-specific integrated circuit (ASIC), a programmable logicarray, a field-programmable gate array (FPGA), or the like. A computeror computer system may comprise one or more processors.

It is also intended to encompass software which defines a configurationof hardware as described herein, such as HDL (hardware descriptionlanguage) software, as is used for designing integrated circuits, or forconfiguring programmable chips, to carry out desired functions. That is,there may be provided a computer readable storage medium having encodedthereon computer readable program code in the form of an integratedcircuit definition dataset that when processed in an integrated circuitmanufacturing system configures the system to manufacture aninterpolation unit configured to perform any of the methods describedherein, or to manufacture an interpolator comprising any apparatusdescribed herein. An integrated circuit definition dataset may be, forexample, an integrated circuit description.

There may be provided a method of manufacturing, at an integratedcircuit manufacturing system, an interpolation unit as described herein.There may be provided an integrated circuit definition dataset that,when processed in an integrated circuit manufacturing system, causes themethod of manufacturing an interpolation unit to be performed.

An integrated circuit definition dataset may be in the form of computercode, for example as a netlist, code for configuring a programmablechip, as a hardware description language defining an integrated circuitat any level, including as register transfer level (RTL) code, ashigh-level circuit representations such as Verilog or VHDL, and aslow-level circuit representations such as OASIS® and GDSII. Higher levelrepresentations which logically define an integrated circuit (such asRTL) may be processed at a computer system configured for generating amanufacturing definition of an integrated circuit in the context of asoftware environment comprising definitions of circuit elements andrules for combining those elements in order to generate themanufacturing definition of an integrated circuit so defined by therepresentation. As is typically the case with software executing at acomputer system so as to define a machine, one or more intermediate usersteps (e.g. providing commands, variables etc.) may be required in orderfor a computer system configured for generating a manufacturingdefinition of an integrated circuit to execute code defining anintegrated circuit so as to generate the manufacturing definition ofthat integrated circuit.

An example of processing an integrated circuit definition dataset at anintegrated circuit manufacturing system so as to configure the system tomanufacture an interpolation unit will now be described with respect toFIG. 13 .

FIG. 13 shows an example of an integrated circuit (IC) manufacturingsystem 1302 which is configured to manufacture an interpolation unit asdescribed in any of the examples herein. In particular, the ICmanufacturing system 1302 comprises a layout processing system 1304 andan integrated circuit generation system 1306. The IC manufacturingsystem 1302 is configured to receive an IC definition dataset (e.g.defining an interpolation unit as described in any of the examplesherein), process the IC definition dataset, and generate an IC accordingto the IC definition dataset (e.g. which embodies an interpolation unitas described in any of the examples herein). The processing of the ICdefinition dataset configures the IC manufacturing system 1302 tomanufacture an integrated circuit embodying an interpolation unit asdescribed in any of the examples herein.

The layout processing system 1304 is configured to receive and processthe IC definition dataset to determine a circuit layout. Methods ofdetermining a circuit layout from an IC definition dataset are known inthe art, and for example may involve synthesising RTL code to determinea gate level representation of a circuit to be generated, e.g. in termsof logical components (e.g. NAND, NOR, AND, OR, MUX and FLIP-FLOPcomponents). A circuit layout can be determined from the gate levelrepresentation of the circuit by determining positional information forthe logical components. This may be done automatically or with userinvolvement in order to optimise the circuit layout. When the layoutprocessing system 1304 has determined the circuit layout it may output acircuit layout definition to the IC generation system 1306. A circuitlayout definition may be, for example, a circuit layout description.

The IC generation system 1306 generates an IC according to the circuitlayout definition, as is known in the art. For example, the ICgeneration system 1306 may implement a semiconductor device fabricationprocess to generate the IC, which may involve a multiple-step sequenceof photo lithographic and chemical processing steps during whichelectronic circuits are gradually created on a wafer made ofsemiconducting material. The circuit layout definition may be in theform of a mask which can be used in a lithographic process forgenerating an IC according to the circuit definition. Alternatively, thecircuit layout definition provided to the IC generation system 1306 maybe in the form of computer-readable code which the IC generation system1306 can use to form a suitable mask for use in generating an IC.

The different processes performed by the IC manufacturing system 1302may be implemented all in one location, e.g. by one party.Alternatively, the IC manufacturing system 1302 may be a distributedsystem such that some of the processes may be performed at differentlocations, and may be performed by different parties. For example, someof the stages of: (i) synthesising RTL code representing the ICdefinition dataset to form a gate level representation of a circuit tobe generated, (ii) generating a circuit layout based on the gate levelrepresentation, (iii) forming a mask in accordance with the circuitlayout, and (iv) fabricating an integrated circuit using the mask, maybe performed in different locations and/or by different parties.

In other examples, processing of the integrated circuit definitiondataset at an integrated circuit manufacturing system may configure thesystem to manufacture an interpolation unit without the IC definitiondataset being processed so as to determine a circuit layout. Forinstance, an integrated circuit definition dataset may define theconfiguration of a reconfigurable processor, such as an FPGA, and theprocessing of that dataset may configure an IC manufacturing system togenerate a reconfigurable processor having that defined configuration(e.g. by loading configuration data to the FPGA).

In some embodiments, an integrated circuit manufacturing definitiondataset, when processed in an integrated circuit manufacturing system,may cause an integrated circuit manufacturing system to generate adevice as described herein. For example, the configuration of anintegrated circuit manufacturing system in the manner described abovewith respect to FIG. 13 by an integrated circuit manufacturingdefinition dataset may cause a device as described herein to bemanufactured.

In some examples, an integrated circuit definition dataset could includesoftware which runs on hardware defined at the dataset or in combinationwith hardware defined at the dataset. In the example shown in FIG. 13 ,the IC generation system may further be configured by an integratedcircuit definition dataset to, on manufacturing an integrated circuit,load firmware onto that integrated circuit in accordance with programcode defined at the integrated circuit definition dataset or otherwiseprovide program code with the integrated circuit for use with theintegrated circuit.

The graphics processing systems and/or interpolation units describedherein may be embodied in hardware on an integrated circuit. Thegraphics processing systems described herein may be configured toperform any of the methods described herein.

The implementation of concepts set forth in this application in devices,apparatus, modules, and/or systems (as well as in methods implementedherein) may give rise to performance improvements when compared withknown implementations. The performance improvements may include one ormore of increased computational performance, reduced latency, increasedthroughput, and/or reduced power consumption. During manufacture of suchdevices, apparatus, modules, and systems (e.g. in integrated circuits)performance improvements can be traded-off against the physicalimplementation, thereby improving the method of manufacture. Forexample, a performance improvement may be traded against layout area,thereby matching the performance of a known implementation but usingless silicon. This may be done, for example, by reusing functionalblocks in a serialised fashion or sharing functional blocks betweenelements of the devices, apparatus, modules and/or systems. Conversely,concepts set forth in this application that give rise to improvements inthe physical implementation of the devices, apparatus, modules, andsystems (such as reduced silicon area) may be traded for improvedperformance. This may be done, for example, by manufacturing multipleinstances of a module within a predefined area budget.

The implementation of concepts set forth in this application in devices,apparatus, modules, and/or systems (as well as in methods implementedherein) may give rise to performance improvements when compared withknown implementations. The performance improvements may include one ormore of increased computational performance, reduced latency, increasedthroughput, and/or reduced power consumption. During manufacture of suchdevices, apparatus, modules, and systems (e.g. in integrated circuits)performance improvements can be traded-off against the physicalimplementation, thereby improving the method of manufacture. Forexample, a performance improvement may be traded against layout area,thereby matching the performance of a known implementation but usingless silicon. This may be done, for example, by reusing functionalblocks in a serialised fashion or sharing functional blocks betweenelements of the devices, apparatus, modules and/or systems. Conversely,concepts set forth in this application that give rise to improvements inthe physical implementation of the devices, apparatus, modules, andsystems (such as reduced silicon area) may be traded for improvedperformance. This may be done, for example, by manufacturing multipleinstances of a module within a predefined area budget.

The applicant hereby discloses in isolation each individual featuredescribed herein and any combination of two or more such features, tothe extent that such features or combinations are capable of beingcarried out based on the present specification as a whole in the lightof the common general knowledge of a person skilled in the art,irrespective of whether such features or combinations of features solveany problems disclosed herein, and without limitation to the scope ofthe claims. The applicant indicates that aspects of the presentinvention may consist of any such individual feature or combination offeatures. In view of the foregoing description it will be evident to aperson skilled in the art that various modifications may be made withinthe scope of the invention.

What is claimed is:
 1. A binary logic circuit for performing aninterpolation calculation between two endpoint values E₀ and E₁ forgenerating an interpolated result P, the values E₀ and E₁ being formedfrom low-dynamic range (LDR) colour endpoint values C₀ and C₁respectively, the binary logic circuit being configured to: perform aninterpolation between the colour endpoint values C₀ and C₁ to generate afirst intermediate interpolated result C₂; and perform one or morelogical processing operations to calculate the interpolated result Paccording to the equation P=└((C₂<<8)+C₂+32)/64┘, or according to theequation P=└((C₂<<8)+128·64+32)/64┘.
 2. The binary logic circuit asclaimed in claim 1, wherein the interpolation calculation between thetwo endpoint values E₀ and E₁ is specified according to the equationp=└(E₀·(64−i)+E₁·i+32)/64┘, where p is equal to the interpolated resultP, and i is a weighting index.
 3. The binary logic circuit as claimed inclaim 1, wherein the binary logic circuit is further configured toperform the interpolation between the colour endpoint values C₀ and C₁using a weighting index i to generate the first intermediateinterpolated result C₂ according to the equation C₂=C₀·(64−i)+C₁·i C₂=for non-exception values of i.
 4. The binary logic circuit as claimed inclaim 3, wherein the binary logic circuit is further configured togenerate the first intermediate interpolated result C₂ for exceptionvalues of i.
 5. The binary logic circuit as claimed in claim 4, whereinthe binary logic circuit is further configured to generate the firstintermediate interpolated result C₂ according to the equation C₂=C₁·ifor exception values of i.
 6. The binary logic circuit as claimed inclaim 4, wherein the binary logic circuit is further configured to:generate a second intermediate interpolated result from the set ofvalues C₀, C₁ and C₂; left-shift the second intermediate interpolatedresult by a number of bits equal to the number of bits of each of thecolour endpoint values C₀ and C₁ and to add to the shifted result aconstant to generate a third intermediate interpolated result; and addthe second intermediate interpolated result to the third intermediateinterpolated result if the interpolated result P is not to be compatiblewith the sRGB colour space; and wherein the binary logic circuit isfurther configured to generate the second intermediate interpolatedresult as: (i) the first intermediate interpolated result C₂, accordingto the equation C₂=C₀·(64−i)+C₁·i for non-exception values of i, whenthe interpolated result P is not to be compatible with an sRGB colourspace and the value of the weighting index is not equal to an exceptionvalue; (ii) the summation of the first intermediate interpolated resultC₂, according to the equation C₂=C₀·(64−i)+C₁·i C₂= for non-exceptionvalues of i, and a numerical constant when the interpolated result P isto be compatible with an sRGB colour space and the value of theweighting index is not equal to an exception value; (iii) the firstintermediate interpolated result C₂ generated for exception values of iwhen the interpolated result P is not to be compatible with an sRGBcolour space and the value of the weighting index is equal to anexception value; and iv) the summation of the first intermediateinterpolated result C₂ generated for exception values of i and anumerical constant when the interpolated result P is to be compatiblewith an sRGB colour space and the value of the weighting index is equalto an exception value.
 7. The binary logic circuit as claimed in claim4, wherein the binary logic circuit is further configured to: generate asecond intermediate interpolated result from the set of values C₀, C₁and C₂; left-shift the second intermediate interpolated result by anumber of bits equal to the number of bits of each of the colourendpoint values C₀ and C₁ and to add to the shifted result a constant togenerate a third intermediate interpolated result; and add the secondintermediate interpolated result to the third intermediate interpolatedresult if the interpolated result P is not to be compatible with thesRGB colour space; and wherein the binary logic circuit is furtherconfigured to: select between (i) a first input dependent on the firstintermediate interpolated result C₂ generated for exception values of i;and (ii) a second input dependent on the first intermediate interpolatedresult C₂, according to the equation C₂=C₀·(64−i)+C₁·i for non-exceptionvalues of i, in dependence on whether the value of the weighting indexis equal to an exception value.
 8. The binary logic circuit as claimedin claim 7, wherein the binary logic circuit is further configured toadd a non-zero numerical constant in the generation of the secondintermediate interpolated result from the set of values C₀, C₁ and C₂only if the interpolated result P is to be compatible with an sRBGcolour space.
 9. The binary logic circuit as claimed in claim 8, whereinthe binary logic circuit is configured to add a non-zero numericalconstant to the result of the selection between the first input and thesecond input.
 10. The binary logic circuit as claimed in claim 8,wherein the binary logic circuit is configured to generate the secondintermediate interpolated result based on the first intermediateinterpolated result C₂ generated for exception values of i, and thefirst intermediate interpolated result C₂, according to the equationC₂=C₀·(64−i)+C₁·i for non-exception values of i.
 11. The binary logiccircuit as claimed in claim 7, wherein the first input is the firstintermediate interpolated result C₂ generated for exception values of iand the second input is the first intermediate interpolated result C₂,according to the equation C₂=C₀·(64−i)+C₁·i for non-exception values ofi.
 12. The binary logic circuit as claimed in claim 3, wherein theweighting index comprises 7 bits, and the binary logic circuit isconfigured to perform the interpolation between the colour endpointvalues C₀ and C₁ using the 6 least significant bits of the weightingindex.
 13. The binary logic circuit as claimed in claim 1, wherein thebinary logic circuit is further configured to: generate a secondintermediate interpolated result from the set of values C₀, C₁ and C₂ independence on whether the interpolated result P is to be compatible withan sRGB colour space; left-shift the second intermediate interpolatedresult by a number of bits equal to the number of bits of each of thecolour endpoint values C₀ and C₁ and to add to the shifted result aconstant to generate a third intermediate interpolated result; and addthe second intermediate interpolated result to the third intermediateinterpolated result if the interpolated result P is not to be compatiblewith the sRGB colour space.
 14. The binary logic circuit as claimed inclaim 13, wherein the binary logic circuit is further configured toright-shift the result of adding the second intermediate interpolatedresult to the third intermediate interpolated result by a specifiednumber of bits to generate the interpolated result P.
 15. The binarylogic circuit as claimed in claim 14, wherein the specified number ofbits is equal to
 6. 16. The binary logic circuit as claimed in claim 13,wherein the binary logic circuit is configured to left-shift the secondintermediate interpolated result by 8 bits and to add a numericalconstant of 32 to generate the third intermediate interpolated result.17. The binary logic circuit as claimed in claim 13, wherein the binarylogic circuit is configured to generate the second intermediateinterpolated result as: (i) the first intermediate interpolated resultC₂ when the interpolated result P is not to be compatible with an sRGBcolour space; (ii) the summation of the first intermediate interpolatedresult C₂ and a numerical constant when the interpolated result P is tobe compatible with an sRGB colour space.
 18. A method of using a binarylogic circuit to interpolate between two endpoint values E₀ and E₁ forgenerating an interpolated result P, the values E₀ and E₁ being formedfrom low-dynamic range (LDR) colour endpoint values C₀ and C₁respectively, the method comprising: performing an interpolation betweenthe colour endpoint values C₀ and C₁ to generate a first intermediateinterpolated result C₂; performing one or more logical processingoperations to calculate the interpolated result P according to theequation P=└((C₂<<8)+C₂+32)/64┘, or according to the equationP=└((C₂<<8)+128·64+32)/64┘.
 19. The method as claimed in claim 18,wherein the interpolation calculation between the two endpoint values E₀and E₁ is specified according to the equationp=└(E₀·(64−i)+E₁·i+32)/64┘, where p is equal to the interpolated resultP, and i is a weighting index.
 20. A non-transitory computer readablestorage medium having stored thereon a computer readable description ofa binary logic circuit for performing an interpolation calculationbetween two endpoint values E₀ and E₁ for generating an interpolatedresult P, the values E₀ and E₁ being formed from low-dynamic range (LDR)colour endpoint values C₀ and C₁ respectively, the binary logic circuitbeing configured to: perform an interpolation between the colourendpoint values C₀ and C₁ to generate a first intermediate interpolatedresult C₂; and perform one or more logical processing operations tocalculate the interpolated result P according to the equationP=└((C₂<<8)+C₂+32)/64┘, or according to the equationP=└((C₂<<8)+128·64+32)/64┘.